package View.TipoDocumento;

import java.awt.Dimension;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;

import Controller.TipoDocumento.TipoDocumentoController;
import Entidade.TipoDocumento;
import framework.component.field.TTextField;
import framework.mvc.GenericView;

public class TipoDocumentoView extends GenericView<TipoDocumento> {
	private static final long serialVersionUID = 6562864197791823390L;
	private TTextField textField;
	private JLabel lblDescrio;
	private JLabel lblModelo;
	private TTextField textField_1;
	private JLabel lblEntradasaida;
	private TTextField textField_2;
	private JLabel lblTabelaPreo;
	private TTextField textField_3;
	private JButton button;
	private JButton button_1;

	public TipoDocumentoView() {
		super(new TipoDocumentoController());
		setTitle("Fox Empresarial - Cadastro de Tipos de Documentos");
		setSize(new Dimension(450, 190));
		setTitle("Cadastro Tipo Documento");
		
		textField = new TTextField();
		textField.setName("DescricaoTipoDocumento");
		textField.setColumns(10);
		
		lblDescrio = new JLabel("Descri\u00E7\u00E3o:");
		
		lblModelo = new JLabel("Modelo:");
		
		textField_1 = new TTextField();
		textField_1.setName("ModeloTipoDocumento");
		textField_1.setColumns(10);
		
		lblEntradasaida = new JLabel("Entrada/Saida:");
		
		textField_2 = new TTextField();
		textField_2.setName("EntradaSaidaTipoDocumento");
		textField_2.setColumns(10);
		
		lblTabelaPreo = new JLabel("Tabela Pre\u00E7o:");
		
		textField_3 = new TTextField();
		textField_3.setName("TabelaPrecoTipoDocumento");
		textField_3.setColumns(10);
		
		button = new JButton("Cancelar");
		button.setName("cancelar");
		
		button_1 = new JButton("Salvar");
		button_1.setName("salvar");
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addGroup(groupLayout.createSequentialGroup()
									.addContainerGap()
									.addComponent(lblEntradasaida))
								.addGroup(groupLayout.createSequentialGroup()
									.addGap(12)
									.addComponent(lblDescrio))
								.addGroup(groupLayout.createSequentialGroup()
									.addContainerGap()
									.addComponent(lblModelo)))
							.addPreferredGap(ComponentPlacement.RELATED)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(textField, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
								.addComponent(textField_1, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
								.addComponent(textField_2, GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)))
						.addGroup(groupLayout.createSequentialGroup()
							.addContainerGap()
							.addComponent(lblTabelaPreo)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(textField_3, GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE))
						.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
							.addContainerGap(268, Short.MAX_VALUE)
							.addComponent(button_1, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(button, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap())
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(lblDescrio))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblModelo)
						.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblEntradasaida)
						.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblTabelaPreo)
						.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(button_1)
						.addComponent(button))
					.addContainerGap(114, Short.MAX_VALUE))
		);
		getContentPane().setLayout(groupLayout);
	}
}
